import 'package:flutter/material.dart';
import 'package:riki_login/entity/staff_login_entity.dart';

import '../base_api.dart';

///作者：范玉辉
///创建时间：2021/8/17
///说明：

///验证登录状态
class CheckLoginStatusApi extends BaseApi<StaffLoginEntity> {
  CheckLoginStatusApi(BuildContext context) : super(context);

  @override
  HttpMethod get httpMethod => HttpMethod.get;

  @override
  String apiMethod(params) => 'app/designer/checkLoginStatus';

  @override
  StaffLoginEntity? onExtractResult(resultData, HttpData<StaffLoginEntity> data) {
    return resultData != null ? StaffLoginEntity.fromJson(resultData) : null;
  }
}
